def f (s,x,c,m):
    if 65<=s<=100:
        return c%2==m%2
    if s>100:
        return c%2!=m%2
    if c == m:
        return 0
    h =[]
    if x!='+1': h+=[f(s+1,'+1',c+1,m)]
    if x!='+2': h+=[f(s+2,'+2',c+1,m)]
    if x!='*2': h+=[f(s*2,'*2',c+1,m)]
    
    
    if (c+1)%2 == m%2:
        return any(h)
    else:
        return all(h)
for s in range(1,65):
    for m in range(1,4):
        if f(s,'',0,m)==1:
             print(s,m)
             break
            
